package com.example.service.impl;


import com.example.dao.UserMapper;
import com.example.entity.*;
import com.example.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper mapper;
    public List<Recording> getRecording(matchCriteria matchcriteria){
        List<Recording> recording = mapper.getbymatchcriteria(matchcriteria);
        return recording;
    }


    public List<Order> orders() {
        List<Order> orders=mapper.getOrder();
        return orders;
    }

    public Long insertV(vehicle_weight_record vehicleWeightRecordecord) {

        mapper.insertVehicle(vehicleWeightRecordecord);
        return vehicleWeightRecordecord.getId();
    }


    public void invalid(Long id) {
        mapper.invalid(id);
    }


    public Long SearchV(String licensePlate, Date heavyweighingTime) {
        return mapper.SearchV(licensePlate,heavyweighingTime);
    }


    public Long insertN(nullWeightRecord record) {
        return mapper.insertN(record);
    }


    public Order getOneOrder(Long id) {
        return mapper.getOneOrder(id);
    }


    public Long VSearchOrder(Long id) {
        return mapper.VSearchOrder(id);
    }


    public String VSearchremark(Long id) {
        return mapper.VSearchremark(id);
    }


    public void insertReceived_weight(Long id, Integer weight) {
        mapper.insertReceived_weight(id,weight);
    }


    public void insertOrder_details(orderRecord details) {
        mapper.insertOrder_details(details);
    }


}
